MT = [0 for x in range(0,624)]
index = 0

def initGen(seed):
    MT[0] = seed
    for i in range(1,264):
        MT[i] = (1812433253 * (MT[i-1] ^ ( MT[i-1] >> 30 )) + i)  & 0xFFFFFFFF

def extNum():
    global index
    if index == 0: genNums()
    
    y = MT[index]
    y = y ^ ( y>>11 )
    y = y ^ (( y<<7 ) & 0x9d2c5680)
    y = y ^ (( y<<15 ) & 0xefc60000)
    y = y ^ ( y>>18 )
    index = (index + 1) % 624
    return y

def genNums():
    for i in range(0,264):
        y = MT[i] & 0x80000000 + ((MT[i+1] % 624) & 0x7FFFFFFF)
        MT[i] = MT[(i+397) % 624] ^ ( y>>1 )
        if y%2 == 1:
            MT[i] = MT[i] ^ 0x9908b0df




initGen(19937)
for i in range(0,0xff):
    print "%08x"%extNum()
